gdk: Drop surface-type
authorMatthias Clasen <mclasen@redhat.com>
Mon, 9 Mar 2020 15:22:55 +0000 (08:22 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 12 Mar 2020 19:30:10 +0000 (15:30 -0400)
We have interfaces for surface subtypes now.

gdk/gdksurface.c
gdk/gdksurface.h
gdk/gdksurfaceprivate.h

index b2276bedd6a3d6ea8fefbdd60eaa894f490629b9..746a1f493b5d48df88dcdac8f86648d4eabf9458 100644 (file)
@@ -81,7 +81,6 @@ enum {
 
 enum {
   PROP_0,
-  PROP_SURFACE_TYPE,
   PROP_CURSOR,
   PROP_DISPLAY,
   PROP_FRAME_CLOCK,
@@ -381,8 +380,6 @@ gdk_surface_init (GdkSurface *surface)
 {
   /* 0-initialization is good for all other fields. */
 
-  surface->surface_type = GDK_SURFACE_TOPLEVEL;
-
   surface->state = GDK_SURFACE_STATE_WITHDRAWN;
   surface->fullscreen_mode = GDK_FULLSCREEN_ON_CURRENT_MONITOR;
   surface->width = 1;
@@ -447,13 +444,6 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
                             FALSE,
                             G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
-  properties[PROP_SURFACE_TYPE] =
-      g_param_spec_enum ("surface-type",
-                          P_("Surface type"),
-                          P_("Surface type"),
-                          GDK_TYPE_SURFACE_TYPE, GDK_SURFACE_TOPLEVEL,
-                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-
   g_object_class_install_properties (object_class, LAST_PROP, properties);
 
   /**
@@ -619,10 +609,6 @@ gdk_surface_set_property (GObject      *object,
       gdk_surface_set_frame_clock (surface, GDK_FRAME_CLOCK (g_value_get_object (value)));
       break;
 
-    case PROP_SURFACE_TYPE:
-      surface->surface_type = g_value_get_enum (value);
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -657,10 +643,6 @@ gdk_surface_get_property (GObject    *object,
       g_value_set_boolean (value, GDK_SURFACE_IS_MAPPED (surface));
       break;
 
-    case PROP_SURFACE_TYPE:
-      g_value_set_enum (value, surface->surface_type);
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
       break;
@@ -891,22 +873,6 @@ gdk_surface_get_widget (GdkSurface *surface)
   return surface->widget;
 }
 
-/**
- * gdk_surface_get_surface_type:
- * @surface: a #GdkSurface
- *
- * Gets the type of the surface. See #GdkSurfaceType.
- *
- * Returns: type of surface
- **/
-GdkSurfaceType
-gdk_surface_get_surface_type (GdkSurface *surface)
-{
-  g_return_val_if_fail (GDK_IS_SURFACE (surface), (GdkSurfaceType) -1);
-
-  return GDK_SURFACE_TYPE (surface);
-}
-
 /**
  * gdk_surface_get_display:
  * @surface: a #GdkSurface
index 2b48e2a42db04e657e268c17e67dd4856cb6a2cf..7a43059c782a08cc0da9a2ba1db64fde3b791da2 100644 (file)
 
 G_BEGIN_DECLS
 
-/**
- * GdkSurfaceType:
- * @GDK_SURFACE_TOPLEVEL: toplevel window (used to implement #GtkWindow)
- * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement #GtkMenu)
- * @GDK_SURFACE_POPUP: popup window with semantics like xdg-popover
- *
- * Describes the kind of surface.
- */
-typedef enum
-{
-  GDK_SURFACE_TOPLEVEL,
-  GDK_SURFACE_TEMP,
-  GDK_SURFACE_POPUP
-} GdkSurfaceType;
-
 /* Size restriction enumeration.
  */
 /**
@@ -346,8 +331,6 @@ GdkSurface *   gdk_surface_new_popup            (GdkSurface    *parent,
 GDK_AVAILABLE_IN_ALL
 void          gdk_surface_destroy               (GdkSurface     *surface);
 GDK_AVAILABLE_IN_ALL
-GdkSurfaceType gdk_surface_get_surface_type     (GdkSurface     *surface);
-GDK_AVAILABLE_IN_ALL
 gboolean      gdk_surface_is_destroyed          (GdkSurface     *surface);
 
 GDK_AVAILABLE_IN_ALL
index 583a9bd12c5f204476e5412485d2196564c785d8..e0cd1d9e13104199a161c68eb4fd70df3c623995 100644 (file)
 
 G_BEGIN_DECLS
 
+typedef enum
+{
+  GDK_SURFACE_TOPLEVEL,
+  GDK_SURFACE_TEMP,
+  GDK_SURFACE_POPUP
+} GdkSurfaceType;
+
 struct _GdkSurface
 {
   GObject parent_instance;
@@ -41,8 +48,6 @@ struct _GdkSurface
   gint x;
   gint y;
 
-  GdkSurfaceType surface_type;
-
   guint8 resize_count;
 
   GdkGLContext *gl_paint_context;